package com.ak;

import java.time.LocalDateTime;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

import com.ak.common.annotation.EnableAuthExceptionHandler;
import com.ak.common.annotation.EnableLettuceRedis;
import com.ak.common.annotation.EnableOauth2FeignClient;
import com.ak.common.annotation.EnableServerProtect;
import com.ak.common.entity.constant.ServerConstants;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@EnableLettuceRedis
@EnableServerProtect
@SpringBootApplication
@EnableOauth2FeignClient
@EnableAuthExceptionHandler
@MapperScan("com.ak.server.*.mapper")
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class AKServerSystemApplication {

    public static void main(String[] args) {
        SpringApplication.run(AKServerSystemApplication.class, args);
        log.info("  _   _   _   _   _   _   _");
        log.info(" / \\ / \\ / \\ / \\ / \\ / \\ / \\");
        log.info("| s | t | a | r | t | e | d |");
        log.info(" \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/");
        log.info("{} 启动完毕，时间：{}", ServerConstants.AK_SERVER_SYSTEM, LocalDateTime.now());
    }
}
